static void type_s(xg_string args, const QXmlStreamAttributes*)
{
- type = args.compare(QLatin1String("GPSData"));
+ type = args.compare(u"GPSData");
}
void device_s(xg_string args, const QXmlStreamAttributes*)
auto linetype = lineparts.at(0);
lineparts.removeFirst();
- if (case_ignore_strcmp(linetype, "Header") == 0) {
+ if (linetype.compare(u"Header", Qt::CaseInsensitive) == 0) {
parse_header(lineparts);
- } else if (case_ignore_strcmp(linetype, "Grid") == 0) {
+ } else if (linetype.compare(u"Grid", Qt::CaseInsensitive) == 0) {
parse_grid(lineparts);
- } else if (case_ignore_strcmp(linetype, "Datum") == 0) {
+ } else if (linetype.compare(u"Datum", Qt::CaseInsensitive) == 0) {
parse_datum(lineparts);
- } else if (case_ignore_strcmp(linetype, "Waypoint") == 0) {
+ } else if (linetype.compare(u"Waypoint", Qt::CaseInsensitive) == 0) {
parse_waypoint(lineparts);
- } else if (case_ignore_strcmp(linetype, "Route Waypoint") == 0) {
+ } else if (linetype.compare(u"Route Waypoint", Qt::CaseInsensitive) == 0) {
parse_route_waypoint(lineparts);
- } else if (case_ignore_strcmp(linetype, "Trackpoint") == 0) {
+ } else if (linetype.compare(u"Trackpoint", Qt::CaseInsensitive) == 0) {
parse_track_waypoint(lineparts);
- } else if (case_ignore_strcmp(linetype, "Route") == 0) {
+ } else if (linetype.compare(u"Route", Qt::CaseInsensitive) == 0) {
parse_route_header(lineparts);
- } else if (case_ignore_strcmp(linetype, "Track") == 0) {
+ } else if (linetype.compare(u"Track", Qt::CaseInsensitive) == 0) {
parse_track_header(lineparts);
- } else if (case_ignore_strcmp(linetype, "Map") == 0) /* do nothing */ ;
+ } else if (linetype.compare(u"Map", Qt::CaseInsensitive) == 0) /* do nothing */ ;
else {
fatal(MYNAME ": Unknown identifier (%s) at line %d!\n", qPrintable(linetype), current_line);
}
file->filewrite = memapi_write;
} else {
file->name = xstrdup(filename);
- file->is_pipe = (filename == "-");
+ file->is_pipe = (filename == '-');
/* Do we have a '.gz' extension in the filename ? */
int len = strlen(file->name);
* last date we saw in this log.
*/
case tt_cache_log_type:
- if ((cdatastr.compare(QLatin1String("Found it")) == 0) &&
+ if ((cdatastr.compare(u"Found it") == 0) &&
(0 == wpt_tmp->gc_data->last_found.toTime_t())) {
wpt_tmp->AllocGCData()->last_found = gc_log_date;
}
fprint_xml_chain(tag->child, wpt);
}
if (wpt && wpt->gc_data->exported.isValid() &&
- tag->tagname.compare(QLatin1String("groundspeak:cache")) == 0) {
+ tag->tagname.compare(u"groundspeak:cache") == 0) {
writer->writeTextElement(QStringLiteral("time"),
wpt->gc_data->exported.toPrettyString());
}
gbfputint32(waypt_time, file_out);
- if (!get_cache_icon(wpt).isEmpty() && wpt->icon_descr.compare(QLatin1String("Geocache Found")) == 0) {
+ if (!get_cache_icon(wpt).isEmpty() && wpt->icon_descr.compare(u"Geocache Found") == 0) {
SymbolId = lowranceusr_find_icon_number_from_desc(get_cache_icon(wpt));
} else {
SymbolId = lowranceusr_find_icon_number_from_desc(wpt->icon_descr);
gbfputint32(2, file_out);
int SymbolId, ColorId;
- if (!get_cache_icon(wpt).isEmpty() && wpt->icon_descr.compare(QLatin1String("Geocache Found")) == 0) {
+ if (!get_cache_icon(wpt).isEmpty() && wpt->icon_descr.compare(u"Geocache Found") == 0) {
if (writing_version == 4) {
SymbolId = lowranceusr4_find_icon_number_from_desc(wpt->icon_descr);
} else {
* mytrack.plt, mytrack-1.plt...unless we're writing to stdout.
*/
- if (fname == "-") {
+ if (fname == '-') {
if (stream == nullptr) {
ozi_open_io(fname, QFile::WriteOnly);
}
const char* codepage = DBFGetCodePage(ihandledb);
if (codepage) {
QString qcodepage(codepage);
- if (qcodepage.compare(QLatin1String("UTF-8"), Qt::CaseInsensitive)) {
+ if (qcodepage.compare(u"UTF-8", Qt::CaseInsensitive)) {
warning(MYNAME ": dbf file %s is in code page %s, but we always process dbf files as UTF-8.\n",qPrintable(ifname),codepage);
}
} else {
status_type
UnicsvFormat::unicsv_parse_status(const QString& str)
{
- if (str.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0 ||
- str.compare(QLatin1String("yes"), Qt::CaseInsensitive) == 0 ||
- str == "1") {
+ if (str.compare(u"true", Qt::CaseInsensitive) == 0 ||
+ str.compare(u"yes", Qt::CaseInsensitive) == 0 ||
+ str == '1') {
return status_true;
}
- if (str.compare(QLatin1String("false"), Qt::CaseInsensitive) == 0 ||
- str.compare(QLatin1String("no"), Qt::CaseInsensitive) == 0 ||
- str == "0") {
+ if (str.compare(u"false", Qt::CaseInsensitive) == 0 ||
+ str.compare(u"no", Qt::CaseInsensitive) == 0 ||
+ str == '0') {
return status_false;
}
return status_unknown;
if (unicsv_detect) {
unicsv_data_type = trkdata;
}
- if (case_ignore_strcmp(value, "none") == 0) {
+ if (value.compare(u"none", Qt::CaseInsensitive) == 0) {
wpt->fix = fix_none;
- } else if (case_ignore_strcmp(value, "2d") == 0) {
+ } else if (value.compare(u"2d", Qt::CaseInsensitive) == 0) {
wpt->fix = fix_2d;
- } else if (case_ignore_strcmp(value, "3d") == 0) {
+ } else if (value.compare(u"3d", Qt::CaseInsensitive) == 0) {
wpt->fix = fix_3d;
- } else if (case_ignore_strcmp(value, "dgps") == 0) {
+ } else if (value.compare(u"dgps", Qt::CaseInsensitive) == 0) {
wpt->fix = fix_dgps;
- } else if (case_ignore_strcmp(value, "pps") == 0) {
+ } else if (value.compare(u"pps", Qt::CaseInsensitive) == 0) {
wpt->fix = fix_pps;
} else {
wpt->fix = fix_unknown;
break;
case XcsvStyle::XT_GEOCACHE_ISAVAILABLE:
gc_data = wpt->AllocGCData();
- if (case_ignore_strcmp(value.trimmed(), "False") == 0) {
+ if (value.trimmed().compare(u"False", Qt::CaseInsensitive) == 0) {
gc_data->is_available = status_false;
- } else if (case_ignore_strcmp(value.trimmed(), "True") == 0) {
+ } else if (value.trimmed().compare(u"True", Qt::CaseInsensitive) == 0) {
gc_data->is_available = status_true;
} else {
gc_data->is_available = status_unknown;
break;
case XcsvStyle::XT_GEOCACHE_ISARCHIVED:
gc_data = wpt->AllocGCData();
- if (case_ignore_strcmp(value.trimmed(), "False") == 0) {
+ if (value.trimmed().compare(u"False", Qt::CaseInsensitive) == 0) {
gc_data->is_archived = status_false;
- } else if (case_ignore_strcmp(value.trimmed(), "True") == 0) {
+ } else if (value.trimmed().compare(u"True", Qt::CaseInsensitive) == 0) {
gc_data->is_archived = status_true;
} else {
gc_data->is_archived = status_unknown;
case XcsvStyle::XT_GPS_FIX:
wpt->fix = (fix_type)(xstrtoi(s, nullptr, 10)-(fix_type)1);
if (wpt->fix < fix_2d) {
- if (!case_ignore_strcmp(value, "none")) {
+ if (!value.compare(u"none", Qt::CaseInsensitive)) {
wpt->fix = fix_none;
- } else if (!case_ignore_strcmp(value, "dgps")) {
+ } else if (!value.compare(u"dgps", Qt::CaseInsensitive)) {
wpt->fix = fix_dgps;
- } else if (!case_ignore_strcmp(value, "pps")) {
+ } else if (!value.compare(u"pps", Qt::CaseInsensitive)) {
wpt->fix = fix_pps;
} else {
wpt->fix = fix_unknown;